﻿<UserControl x:Class="AzukiMapUI.LayerVisibility"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
 	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"	
    mc:Ignorable="d"   
    Width="600" Height="400">
    <Grid x:Name="LayoutRoot" Background="White">

        <Grid.RowDefinitions>
            <RowDefinition Height="26"/>
            <RowDefinition Height="26"/>
            <RowDefinition Height="26"/>
            <RowDefinition Height="26"/>
            <RowDefinition Height="26"/>
            <RowDefinition Height="26"/>
            <RowDefinition Height="26"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="120"/>
            <ColumnDefinition Width="28"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <!-- transparent -->
        <TextBlock Height="Auto" HorizontalAlignment="Left" VerticalAlignment="Center" Width="Auto" Text="Opacity" TextWrapping="Wrap" Margin="20,0,0,0"/>
        <Image x:Name="IconErrorOpacity" Margin="4,4.5,8,5.5" Visibility="Visible" Source="../icons/error.png" Stretch="Fill" Grid.Column="1"/>
        <TextBox x:Name="TbOpacity" LostFocus="TbOpacity_LostFocus" HorizontalAlignment="Left" Margin="4,2,0,2" Width="36" Grid.Column="2" Text="100" TextWrapping="Wrap" Height="Auto" VerticalAlignment="Center"/>
        <TextBlock HorizontalAlignment="Left" Margin="44,4.5,0,5.5" Width="Auto" Text="%" TextWrapping="Wrap" Height="Auto" Grid.Column="2" Grid.Row="0" d:LayoutOverrides="Height"/>
        
        <!-- max scale -->
        <CheckBox x:Name="ChkMaxScale" Checked="ChkMaxScale_Checked" Unchecked="ChkMaxScale_Unchecked" Height="Auto" VerticalAlignment="Center" Width="158" Content="Max Scale" d:LayoutOverrides="HorizontalAlignment" HorizontalAlignment="Left" Grid.Row="1" Grid.ColumnSpan="2" Margin="0,0,0,0"/>
        <TextBlock x:Name="TbkMaxScale" HorizontalAlignment="Left" Margin="8,4.5,0,5.5" Width="Auto" Text="1:" TextWrapping="Wrap" Height="Auto" Grid.Column="2" Grid.Row="1" d:LayoutOverrides="Height" Visibility="Collapsed"/>
        <Image x:Name="IconErrorMaxScale" Margin="4,4.5,8,5.5" Visibility="Collapsed" Source="../icons/error.png" Stretch="Fill" Grid.Column="1" Grid.Row="1"/>
        <TextBox x:Name="TbMaxScale" LostFocus="TbMaxScale_LostFocus" IsEnabled="True" HorizontalAlignment="Left" Margin="24,2,0,2" Width="120" Grid.Column="2" Grid.Row="1" Text="" TextWrapping="Wrap" Height="Auto" VerticalAlignment="Center" Visibility="Collapsed"/>
        
        <!-- min scale -->
        <CheckBox x:Name="ChkMinScale" Checked="ChkMinScale_Checked" Unchecked="ChkMinScale_Unchecked" Height="Auto" VerticalAlignment="Center" Width="158" Content="Min Scale" HorizontalAlignment="Left" Grid.Row="2" Grid.ColumnSpan="2" Margin="0,0,0,0"/>
        <TextBlock x:Name="TbkMinScale" HorizontalAlignment="Left" Margin="8,4.5,0,5.5" Width="Auto" Text="1:" TextWrapping="Wrap" Height="Auto" Grid.Column="2" Grid.Row="2" d:LayoutOverrides="Height" Visibility="Collapsed"/>
        <Image x:Name="IconErrorMinScale" Margin="4,4.5,8,5.5" Visibility="Collapsed" Source="../icons/error.png" Stretch="Fill" Grid.Column="1" Grid.Row="2"/>
        <TextBox x:Name="TbMinScale" LostFocus="TbMinScale_LostFocus" IsEnabled="True" HorizontalAlignment="Left" Margin="24,2,0,2" Width="120" Grid.Column="2" Grid.Row="2" Text="" TextWrapping="Wrap" Height="Auto" VerticalAlignment="Center" Visibility="Collapsed"/>
        
        <!-- clipping -->
        <CheckBox x:Name="ChkClipping" Checked="ChkClipping_Checked" Unchecked="ChkClipping_Unchecked" Height="Auto" Width="158" Content="Clipping" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="3" Grid.ColumnSpan="2" Margin="0,0,0,0"/>
        <Image x:Name="IconErrorClipping" Margin="4,4.5,8,5.5" Visibility="Collapsed" Source="../icons/error.png" Stretch="Fill" Grid.Column="1" Grid.Row="3"/>

        <!-- clip by extent -->
        <RadioButton x:Name="RbByExtent" Checked="RbByExtent_Checked" Unchecked="RbByExtent_Unchecked" HorizontalAlignment="Left" Margin="20,0,0,0" Width="106" Content="by Extent" Grid.Row="4" Height="Auto" VerticalAlignment="Center" IsChecked="True" Visibility="Collapsed"/>
        
        <!-- max point -->
        <TextBlock x:Name="TbkMaxPoint1" HorizontalAlignment="Left" Margin="6,0,0,0" Width="6" Text="(" TextWrapping="Wrap" d:LayoutOverrides="HorizontalAlignment" Grid.Column="2" Grid.Row="5" Height="Auto" VerticalAlignment="Center" Visibility="Collapsed"/>
        <Image x:Name="IconErrorMaxPoint" Margin="4,4.5,8,5.5" Visibility="Collapsed" Source="../icons/error.png" Stretch="Fill" Grid.Column="1" Grid.Row="5"/>
        <TextBlock x:Name="TbkMaxPoint2" Height="Auto" Width="Auto" Text="Max Point" TextWrapping="Wrap" Margin="36,0,29,0" d:LayoutOverrides="Width" Grid.Row="5" VerticalAlignment="Center" Visibility="Collapsed"/>
        <TextBox x:Name="TbMaxLon" LostFocus="TbMaxLon_LostFocus" Margin="17,2,0,2" TextWrapping="Wrap" Width="120" d:LayoutOverrides="HorizontalAlignment, Width" HorizontalAlignment="Left" Grid.Column="2" Grid.Row="5" Height="Auto" VerticalAlignment="Center" Visibility="Collapsed"/>
        <TextBlock x:Name="TbkMaxPoint3" HorizontalAlignment="Left" Margin="141,0,0,0" Width="6" Text="," TextWrapping="Wrap" d:LayoutOverrides="HorizontalAlignment" Grid.Column="2" Grid.Row="5" Height="Auto" VerticalAlignment="Center" Visibility="Collapsed"/>
        <TextBox x:Name="TbMaxLat" LostFocus="TbMaxLat_LostFocus" Margin="161,2,0,2" TextWrapping="Wrap" Width="120" d:LayoutOverrides="HorizontalAlignment" Grid.Column="2" Grid.Row="5" HorizontalAlignment="Left" Height="Auto" VerticalAlignment="Center" Visibility="Collapsed"/>
        <TextBlock x:Name="TbkMaxPoint4" HorizontalAlignment="Left" Margin="285,0,0,0" Width="6" Text=")" TextWrapping="Wrap" d:LayoutOverrides="HorizontalAlignment" Grid.Column="2" Grid.Row="5" Height="Auto" VerticalAlignment="Center" Visibility="Collapsed"/>

        <!-- min point -->
        <TextBlock x:Name="TbkMinPoint1" Height="Auto" Width="Auto" Text="Min Point" TextWrapping="Wrap" Margin="36,0,29,0" Grid.Row="6" d:LayoutOverrides="Width" VerticalAlignment="Center" Visibility="Collapsed"/>
        <Image x:Name="IconErrorMinPoint" Margin="4,4.5,8,5.5" Visibility="Collapsed" Source="../icons/error.png" Stretch="Fill" Grid.Column="1" Grid.Row="6"/>
        <TextBlock x:Name="TbkMinPoint2" HorizontalAlignment="Left" Margin="6,0,0,0" Width="6" Text="(" TextWrapping="Wrap" Grid.Column="2" Grid.Row="6" Height="Auto" VerticalAlignment="Center" Visibility="Collapsed"/>
        <TextBox x:Name="TbMinLon" LostFocus="TbMinLon_LostFocus" Margin="17,2,0,2" TextWrapping="Wrap" Width="120" HorizontalAlignment="Left" Height="Auto" Grid.Column="2" Grid.Row="6" d:LayoutOverrides="Width" VerticalAlignment="Center" Visibility="Collapsed"/>
        <TextBlock x:Name="TbkMinPoint3" HorizontalAlignment="Left" Margin="141,0,0,0" Width="6" Text="," TextWrapping="Wrap" Grid.Column="2" Grid.Row="6" Height="Auto" VerticalAlignment="Center" Visibility="Collapsed"/>
        <TextBox x:Name="TbMinLat" LostFocus="TbMinLat_LostFocus" Margin="161,2,0,2" TextWrapping="Wrap" Height="Auto" Grid.Column="2" Grid.Row="6" Width="120" d:LayoutOverrides="Height" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="Collapsed"/>
        <TextBlock x:Name="TbkMinPoint4" HorizontalAlignment="Left" Margin="285,2,0,2" Width="6" Text=")" TextWrapping="Wrap" Grid.Column="2" Grid.Row="6" Height="Auto" d:LayoutOverrides="Height" VerticalAlignment="Center" Visibility="Collapsed"/>

        <!-- clip by polygon -->
        <RadioButton x:Name="RbByPolygon" Checked="RbByPolygon_Checked" Unchecked="RbByPolygon_Unchecked" Height="Auto" HorizontalAlignment="Left" Margin="-40,0,0,0" VerticalAlignment="Center" Width="106" Content="by Polygon" Grid.Row="4" d:LayoutOverrides="HorizontalAlignment" Grid.Column="2" Visibility="Collapsed" IsEnabled="False"/>
        <TextBlock x:Name="TbkPolygon" Height="Auto" Width="Auto" Text="Clip Ploygon WKT" TextWrapping="Wrap" Margin="36,4,-44,4" Grid.Row="5" d:LayoutOverrides="Height" Grid.ColumnSpan="2" Visibility="Collapsed"/>
        <Image x:Name="IconErrorPolygon" Margin="16,5,0,5" Visibility="Collapsed" Source="../icons/error.png" Stretch="Fill" Grid.Row="6" Width="16" HorizontalAlignment="Left"/>
        <TextBox x:Name="TbPolygon" LostFocus="TbPolygon_LostFocus" Margin="36,4,8,4" Grid.ColumnSpan="3" Grid.Row="6" Text="POLYGON(())" TextWrapping="Wrap" Grid.RowSpan="3" Visibility="Collapsed" Height="Auto" VerticalAlignment="Stretch"/>

    </Grid>
</UserControl>
